home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Appearance.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  70.9 KB  |  1,645 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Appearance.p
  3.  
  4.      Contains:    Appearance Manager & SDK Interfaces.
  5.  
  6.      Version:    Technology:    Appearance 1.0
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Appearance;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __APPEARANCE__}
  28. {$SETC __APPEARANCE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC AppearanceIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MACWINDOWS__}
  38. {$I MacWindows.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __QUICKDRAW__}
  41. {$I Quickdraw.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __DIALOGS__}
  44. {$I Dialogs.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __FILES__}
  47. {$I Files.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __ICONS__}
  50. {$I Icons.p}
  51. {$ENDC}
  52. {$IFC UNDEFINED __CONTROLS__}
  53. {$I Controls.p}
  54. {$ENDC}
  55. {$IFC UNDEFINED __TEXTEDIT__}
  56. {$I TextEdit.p}
  57. {$ENDC}
  58. {$IFC UNDEFINED __QDOFFSCREEN__}
  59. {$I QDOffscreen.p}
  60. {$ENDC}
  61. {$IFC UNDEFINED __TEXTCOMMON__}
  62. {$I TextCommon.p}
  63. {$ENDC}
  64.  
  65. {——————————————————————————————————————————————————————————————————————————————————}
  66. { Appearance Manager constants, etc.                                                }
  67. {——————————————————————————————————————————————————————————————————————————————————}
  68.  
  69. {$PUSH}
  70. {$ALIGN MAC68K}
  71. {$LibExport+}
  72.  
  73.  
  74. CONST
  75.                                                                 {  Appearance Trap Number  }
  76.     _AppearanceDispatch            = $AA74;
  77.  
  78. { Gestalt selector and values for the Appearance Manager }
  79.     gestaltAppearanceAttr        = 'appr';
  80.     gestaltAppearanceExists        = 0;
  81.     gestaltAppearanceCompatMode    = 1;
  82.  
  83. { Appearance Manager Error Codes }
  84.     appearanceBadBrushIndexErr    = -30560;                        {  pattern index invalid  }
  85.     appearanceProcessRegisteredErr = -30561;
  86.     appearanceProcessNotRegisteredErr = -30562;
  87.     appearanceBadTextColorIndexErr = -30563;
  88.  
  89.     kThemeActiveDialogBackgroundBrush = 1;                        {  Dialogs  }
  90.     kThemeInactiveDialogBackgroundBrush = 2;                    {  Dialogs  }
  91.     kThemeActiveAlertBackgroundBrush = 3;
  92.     kThemeInactiveAlertBackgroundBrush = 4;
  93.     kThemeActiveModelessDialogBackgroundBrush = 5;
  94.     kThemeInactiveModelessDialogBackgroundBrush = 6;
  95.     kThemeActiveUtilityWindowBackgroundBrush = 7;                {  Miscellaneous  }
  96.     kThemeInactiveUtilityWindowBackgroundBrush = 8;                {  Miscellaneous  }
  97.     kThemeListViewSortColumnBackgroundBrush = 9;                {  Finder  }
  98.     kThemeListViewBackgroundBrush = 10;
  99.     kThemeIconLabelBackgroundBrush = 11;
  100.     kThemeListViewSeparatorBrush = 12;
  101.     kThemeChasingArrowsBrush    = 13;
  102.     kThemeDragHiliteBrush        = 14;
  103.     kThemeDocumentWindowBackgroundBrush = 15;
  104.     kThemeFinderWindowBackgroundBrush = 16;
  105.  
  106.  
  107. TYPE
  108.     ThemeBrush                            = SInt16;
  109.  
  110. CONST
  111.     kThemeActiveDialogTextColor    = 1;                            {  Dialogs  }
  112.     kThemeInactiveDialogTextColor = 2;
  113.     kThemeActiveAlertTextColor    = 3;
  114.     kThemeInactiveAlertTextColor = 4;
  115.     kThemeActiveModelessDialogTextColor = 5;
  116.     kThemeInactiveModelessDialogTextColor = 6;
  117.     kThemeActiveWindowHeaderTextColor = 7;                        {  Primitives  }
  118.     kThemeInactiveWindowHeaderTextColor = 8;
  119.     kThemeActivePlacardTextColor = 9;                            {  Primitives  }
  120.     kThemeInactivePlacardTextColor = 10;
  121.     kThemePressedPlacardTextColor = 11;
  122.     kThemeActivePushButtonTextColor = 12;                        {  Primitives  }
  123.     kThemeInactivePushButtonTextColor = 13;
  124.     kThemePressedPushButtonTextColor = 14;
  125.     kThemeActiveBevelButtonTextColor = 15;                        {  Primitives  }
  126.     kThemeInactiveBevelButtonTextColor = 16;
  127.     kThemePressedBevelButtonTextColor = 17;
  128.     kThemeActivePopupButtonTextColor = 18;                        {  Primitives  }
  129.     kThemeInactivePopupButtonTextColor = 19;
  130.     kThemePressedPopupButtonTextColor = 20;
  131.     kThemeIconLabelTextColor    = 21;                            {  Finder  }
  132.     kThemeListViewTextColor        = 22;
  133.  
  134.  
  135. TYPE
  136.     ThemeTextColor                        = SInt16;
  137. { States to draw primitives: disabled, active, and pressed (hilited) }
  138.  
  139. CONST
  140.     kThemeStateDisabled            = 0;
  141.     kThemeStateActive            = 1;
  142.     kThemeStatePressed            = 2;
  143.  
  144.  
  145. TYPE
  146.     ThemeDrawState                        = UInt32;
  147. {——————————————————————————————————————————————————————————————————————————————————}
  148. { Window Manager constants, etc.                                                    }
  149. {——————————————————————————————————————————————————————————————————————————————————}
  150.  
  151. CONST
  152.                                                                 {  Resource IDs for new window defprocs  }
  153.     kWindowDocumentDefProcResID    = 64;
  154.     kWindowDialogDefProcResID    = 65;
  155.     kWindowUtilityDefProcResID    = 66;
  156.     kWindowUtilitySideTitleDefProcResID = 67;
  157.  
  158.                                                                 {  Proc IDs for theme-savvy windows  }
  159.     kWindowDocumentProc            = 1024;
  160.     kWindowGrowDocumentProc        = 1025;
  161.     kWindowHorizZoomDocumentProc = 1026;
  162.     kWindowHorizZoomGrowDocumentProc = 1027;
  163.     kWindowVertZoomDocumentProc    = 1028;
  164.     kWindowVertZoomGrowDocumentProc = 1029;
  165.     kWindowFullZoomDocumentProc    = 1030;
  166.     kWindowFullZoomGrowDocumentProc = 1031;
  167.  
  168.                                                                 {  Proc IDs for theme-savvy dialogs  }
  169.     kWindowPlainDialogProc        = 1040;
  170.     kWindowShadowDialogProc        = 1041;
  171.     kWindowModalDialogProc        = 1042;
  172.     kWindowMovableModalDialogProc = 1043;
  173.     kWindowAlertProc            = 1044;
  174.     kWindowMovableAlertProc        = 1045;
  175.  
  176.                                                                 {  Proc IDs for top title bar theme-savvy floating windows  }
  177.     kWindowFloatProc            = 1057;
  178.     kWindowFloatGrowProc        = 1059;
  179.     kWindowFloatHorizZoomProc    = 1061;
  180.     kWindowFloatHorizZoomGrowProc = 1063;
  181.     kWindowFloatVertZoomProc    = 1065;
  182.     kWindowFloatVertZoomGrowProc = 1067;
  183.     kWindowFloatFullZoomProc    = 1069;
  184.     kWindowFloatFullZoomGrowProc = 1071;
  185.  
  186.                                                                 {  Proc IDs for side title bar theme-savvy floating windows  }
  187.     kWindowFloatSideProc        = 1073;
  188.     kWindowFloatSideGrowProc    = 1075;
  189.     kWindowFloatSideHorizZoomProc = 1077;
  190.     kWindowFloatSideHorizZoomGrowProc = 1079;
  191.     kWindowFloatSideVertZoomProc = 1081;
  192.     kWindowFloatSideVertZoomGrowProc = 1083;
  193.     kWindowFloatSideFullZoomProc = 1085;
  194.     kWindowFloatSideFullZoomGrowProc = 1087;
  195.  
  196.                                                                 {  Region values to pass into GetWindowRegion  }
  197.     kWindowTitleBarRgn            = 0;
  198.     kWindowTitleTextRgn            = 1;
  199.     kWindowCloseBoxRgn            = 2;
  200.     kWindowZoomBoxRgn            = 3;
  201.     kWindowDragRgn                = 5;
  202.     kWindowGrowRgn                = 6;
  203.     kWindowCollapseBoxRgn        = 7;
  204.     kWindowStructureRgn            = 32;
  205.     kWindowContentRgn            = 33;
  206.  
  207.  
  208. TYPE
  209.     WindowRegionCode                    = UInt16;
  210.  
  211. CONST
  212.                                                                 {  Window Features returned by GetWindowFeatures  }
  213.     kWindowCanGrow                = $01;
  214.     kWindowCanZoom                = $02;
  215.     kWindowCanCollapse            = $04;
  216.     kWindowIsModal                = $08;
  217.     kWindowCanGetWindowRegion    = $10;
  218.     kWindowIsAlert                = $20;
  219.     kWindowHasTitleBar            = $40;
  220.  
  221.                                                                 {  New window messages  }
  222.     kWindowMsgGetFeatures        = 7;
  223.     kWindowMsgGetRegion            = 8;
  224.  
  225.                                                                 {  New Window part codes  }
  226.     inCollapseBox                = 11;
  227.  
  228.                                                                 {  Window Definition hit test result codes ("WindowPart") }
  229.     wInCollapseBox                = 9;
  230.  
  231. { Window positioning constants }
  232.     kWindowDefaultPosition        = $0000;
  233.     kWindowCenterMainScreen        = $280A;
  234.     kWindowAlertPositionMainScreen = $300A;
  235.     kWindowStaggerMainScreen    = $380A;
  236.     kWindowCenterParentWindow    = $A80A;
  237.     kWindowAlertPositionParentWindow = $B00A;
  238.     kWindowStaggerParentWindow    = $B80A;
  239.     kWindowCenterParentWindowScreen = $680A;
  240.     kWindowAlertPositionParentWindowScreen = $700A;
  241.     kWindowStaggerParentWindowScreen = $780A;
  242.  
  243. { GetWindowRegionRec - used for WDEF calls with kWindowMsgGetRegion }
  244.  
  245. TYPE
  246.     GetWindowRegionRecPtr = ^GetWindowRegionRec;
  247.     GetWindowRegionRec = RECORD
  248.         winRgn:                    RgnHandle;
  249.         regionCode:                WindowRegionCode;
  250.     END;
  251.  
  252.     GetWindowRegionPtr                    = ^GetWindowRegionRec;
  253. {——————————————————————————————————————————————————————————————————————————————————}
  254. { Dialog Manager constants, etc.                                                    }
  255. {——————————————————————————————————————————————————————————————————————————————————}
  256.  
  257. CONST
  258.                                                                 {  Alert types to pass into StandardAlert  }
  259.     kAlertStopAlert                = 0;
  260.     kAlertNoteAlert                = 1;
  261.     kAlertCautionAlert            = 2;
  262.     kAlertPlainAlert            = 3;
  263.  
  264.  
  265. TYPE
  266.     AlertType                            = SInt16;
  267.  
  268. CONST
  269.     kAlertDefaultOKText            = -1;                            {  "OK" }
  270.     kAlertDefaultCancelText        = -1;                            {  "Cancel" }
  271.     kAlertDefaultOtherText        = -1;                            {  "Don't Save" }
  272.  
  273. { StandardAlert alert button numbers }
  274.     kAlertStdAlertOKButton        = 1;
  275.     kAlertStdAlertCancelButton    = 2;
  276.     kAlertStdAlertOtherButton    = 3;
  277.     kAlertStdAlertHelpButton    = 4;
  278.  
  279.                                                                 {  Dialog Flags for use in NewFeaturesDialog or dlgx resource  }
  280.     kDialogFlagsUseThemeBackground = $01;
  281.     kDialogFlagsUseControlHierarchy = $02;
  282.     kDialogFlagsHandleMovableModal = $04;
  283.     kDialogFlagsUseThemeControls = $08;
  284.  
  285.                                                                 {  Alert Flags for use in alrx resource  }
  286.     kAlertFlagsUseThemeBackground = $01;
  287.     kAlertFlagsUseControlHierarchy = $02;
  288.     kAlertFlagsAlertIsMovable    = $04;
  289.     kAlertFlagsUseThemeControls    = $08;
  290.  
  291. { For dftb resource }
  292.     kDialogFontNoFontStyle        = 0;
  293.     kDialogFontUseFontMask        = $0001;
  294.     kDialogFontUseFaceMask        = $0002;
  295.     kDialogFontUseSizeMask        = $0004;
  296.     kDialogFontUseForeColorMask    = $0008;
  297.     kDialogFontUseBackColorMask    = $0010;
  298.     kDialogFontUseModeMask        = $0020;
  299.     kDialogFontUseJustMask        = $0040;
  300.     kDialogFontUseAllMask        = $00FF;
  301.     kDialogFontAddFontSizeMask    = $0100;
  302.     kDialogFontUseFontMaskMask    = $0200;
  303.  
  304.  
  305. TYPE
  306.     AlertStdAlertParamRecPtr = ^AlertStdAlertParamRec;
  307.     AlertStdAlertParamRec = RECORD
  308.         movable:                BOOLEAN;                                {  Make alert movable modal  }
  309.         helpButton:                BOOLEAN;                                {  Is there a help button?  }
  310.         filterProc:                ModalFilterUPP;                            {  Event filter  }
  311.         defaultText:            StringPtr;                                {  Text for button in OK position  }
  312.         cancelText:                StringPtr;                                {  Text for button in cancel position  }
  313.         otherText:                StringPtr;                                {  Text for button in left position  }
  314.         defaultButton:            SInt16;                                    {  Which button behaves as the default  }
  315.         cancelButton:            SInt16;                                    {  Which one behaves as cancel (can be 0)  }
  316.         position:                UInt16;                                    {  Position (kWindowDefaultPosition in this case  }
  317.                                                                         {  equals kWindowAlertPositionParentWindowScreen)  }
  318.     END;
  319.  
  320.     AlertStdAlertParamPtr                = ^AlertStdAlertParamRec;
  321. {——————————————————————————————————————————————————————————————————————————————————}
  322. { Control Manager constants, etc.                                                    }
  323. {——————————————————————————————————————————————————————————————————————————————————}
  324.  
  325. CONST
  326.     _ControlDispatch            = $AA73;
  327.  
  328.                                                                 {  resource types for new controls  }
  329.     kControlTabListResType        = 'tab#';                        {  used for tab control only }
  330.     kControlListDescResType        = 'ldes';                        {  used for list box control only }
  331.  
  332.                                                                 {  new part codes for new controls  }
  333.     kControlEditTextPart        = 5;
  334.     kControlPicturePart            = 6;
  335.     kControlIconPart            = 7;
  336.     kControlClockPart            = 8;
  337.     kControlListBoxPart            = 24;
  338.     kControlListBoxDoubleClickPart = 25;
  339.  
  340.     kControlSupportsNewMessages    = ' ok ';                        {  CDEF should return as result of kControlMsgTestNewMsgSupport }
  341.  
  342. { focusing part codes }
  343.     kControlFocusNoPart            = 0;                            {  tells control to clear its focus }
  344.     kControlFocusNextPart        = -1;                            {  tells control to focus on the next part }
  345.     kControlFocusPrevPart        = -2;                            {  tells control to focus on the previous part }
  346.  
  347.  
  348. TYPE
  349.     ControlFocusPart                    = SInt16;
  350. { Key Filter result codes                                                             }
  351. {                                                                                    }
  352. { Certain controls can have a keyfilter attached to them. The filter proc should    }
  353. { return one of the two constants below. If kKeyFilterBlockKey is returned, the    }
  354. { key is blocked and never makes it to the control. If kKeyFilterPassKey is        }
  355. { returned, the control receives the keystroke.                                    }
  356.  
  357. CONST
  358.     kControlKeyFilterBlockKey    = 0;
  359.     kControlKeyFilterPassKey    = 1;
  360.  
  361.  
  362. TYPE
  363.     ControlKeyFilterResult                = SInt16;
  364. {——————————————————————————————————————————————————————————————————————————————————————}
  365. {     SPECIAL FONT USAGE NOTES: You can specify the font to use for many control types.
  366.     The constants below are meta-font numbers which you can use to set a particular
  367.     control's font usage. There are essentially two modes you can use: 1) default,
  368.     which is essentially the same as it always has been, i.e. it uses the system font, unless
  369.     directed to use the window font via a control variant. 2) you can specify to use
  370.     the big or small system font in a generic manner. The Big system font is the font
  371.     used in menus, etc. Chicago has filled that role for some time now. Small system
  372.     font is currently Geneva 10. The meta-font number implies the size and style.
  373.     
  374.     NOTE:        Not all font attributes are used by all controls. Most, in fact, ignore
  375.                 the fore and back color (Static Text is the only one that does, for
  376.                 backwards compatibility). Also size, face, and addFontSize are ignored
  377.                 when using the meta-font numbering.
  378. }
  379. {——————————————————————————————————————————————————————————————————————————————————————}
  380.  
  381. CONST
  382.                                                                 {  Meta-font numbering - see not above  }
  383.     kControlFontBigSystemFont    = -1;                            {  force to big system font }
  384.     kControlFontSmallSystemFont    = -2;                            {  force to small system font }
  385.     kControlFontSmallBoldSystemFont = -3;                        {  force to small bold system font }
  386.  
  387. { Add these masks together to set the flags field of a ControlFontStyleRec    }
  388. { They specify which fields to apply to the text. It is important to make    }
  389. { sure that you specify only the fields that you wish to set.                }
  390.     kControlUseFontMask            = $0001;
  391.     kControlUseFaceMask            = $0002;
  392.     kControlUseSizeMask            = $0004;
  393.     kControlUseForeColorMask    = $0008;
  394.     kControlUseBackColorMask    = $0010;
  395.     kControlUseModeMask            = $0020;
  396.     kControlUseJustMask            = $0040;
  397.     kControlUseAllMask            = $00FF;
  398.     kControlAddFontSizeMask        = $0100;
  399.  
  400.  
  401. TYPE
  402.     ControlFontStyleRecPtr = ^ControlFontStyleRec;
  403.     ControlFontStyleRec = RECORD
  404.         flags:                    SInt16;
  405.         font:                    SInt16;
  406.         size:                    SInt16;
  407.         style:                    SInt16;
  408.         mode:                    SInt16;
  409.         just:                    SInt16;
  410.         foreColor:                RGBColor;
  411.         backColor:                RGBColor;
  412.     END;
  413.  
  414.     ControlFontStylePtr                    = ^ControlFontStyleRec;
  415. {——————————————————————————————————————————————————————————————————————————————————————}
  416. { Common data tags for Get/SetControlData                                                }
  417. {——————————————————————————————————————————————————————————————————————————————————————}
  418.  
  419. CONST
  420.     kControlFontStyleTag        = 'font';
  421.     kControlKeyFilterTag        = 'fltr';
  422.  
  423. {——————————————————————————————————————————————————————————————————————————————————————}
  424. { Errors are in the range -30580 .. -30599                                                }
  425. {——————————————————————————————————————————————————————————————————————————————————————}
  426.     errMessageNotSupported        = -30580;
  427.     errDataNotSupported            = -30581;
  428.     errControlDoesntSupportFocus = -30582;
  429.     errWindowDoesntSupportFocus    = -30583;
  430.     errUnknownControl            = -30584;
  431.     errCouldntSetFocus            = -30585;
  432.     errNoRootControl            = -30586;
  433.     errRootAlreadyExists        = -30587;
  434.     errInvalidPartCode            = -30588;
  435.     errControlsAlreadyExist        = -30589;
  436.     errControlIsNotEmbedder        = -30590;
  437.     errDataSizeMismatch            = -30591;
  438.     errControlHiddenOrDisabled    = -30592;
  439.     errWindowRegionCodeInvalid    = -30593;
  440.     errCantEmbedIntoSelf        = -30594;
  441.     errCantEmbedRoot            = -30595;
  442.     errItemNotControl            = -30596;
  443.  
  444.                                                                 {  Control feature bits - returned by GetControlFeatures  }
  445.     kControlSupportsGhosting    = $01;
  446.     kControlSupportsEmbedding    = $02;
  447.     kControlSupportsFocus        = $04;
  448.     kControlWantsIdle            = $08;
  449.     kControlWantsActivate        = $10;
  450.     kControlHandlesTracking        = $20;
  451.     kControlSupportsDataAccess    = $40;
  452.     kControlHasSpecialBackground = $80;
  453.     kControlGetsFocusOnClick    = $0100;
  454.     kControlSupportsCalcBestRect = $0200;
  455.     kControlSupportsLiveFeedback = $0400;
  456.  
  457.                                                                 {  Control Messages  }
  458.     kControlMsgDrawGhost        = 13;
  459.     kControlMsgCalcBestRect        = 14;                            {  Calculate best fitting rectangle for control }
  460.     kControlMsgHandleTracking    = 15;
  461.     kControlMsgFocus            = 16;                            {  param indicates action. }
  462.     kControlMsgKeyDown            = 17;
  463.     kControlMsgIdle                = 18;
  464.     kControlMsgGetFeatures        = 19;
  465.     kControlMsgSetData            = 20;
  466.     kControlMsgGetData            = 21;
  467.     kControlMsgActivate            = 22;
  468.     kControlMsgSetUpBackground    = 23;
  469.     kControlMsgCalcValue        = 24;
  470.     kControlMsgSubControlHit    = 25;
  471.     kControlMsgCalcValueFromPos    = 26;
  472.     kControlMsgTestNewMsgSupport = 27;                            {  See if this control supports new messaging }
  473.  
  474. {——————————————————————————————————————————————————————————————————————————————————————}
  475. {     This structure is passed into a CDEF when called with the kControlMsgHandleTracking    }
  476. {    message                                                                             }
  477. {——————————————————————————————————————————————————————————————————————————————————————}
  478.  
  479. TYPE
  480.     ControlTrackingRecPtr = ^ControlTrackingRec;
  481.     ControlTrackingRec = RECORD
  482.         startPt:                Point;
  483.         modifiers:                SInt16;
  484.         action:                    ControlActionUPP;
  485.     END;
  486.  
  487.     ControlTrackingPtr                    = ^ControlTrackingRec;
  488. {——————————————————————————————————————————————————————————————————————————————————————}
  489. { This structure is passed into a CDEF when called with the kControlMsgKeyDown message }
  490. {——————————————————————————————————————————————————————————————————————————————————————}
  491.     ControlKeyDownRecPtr = ^ControlKeyDownRec;
  492.     ControlKeyDownRec = RECORD
  493.         modifiers:                SInt16;
  494.         keyCode:                SInt16;
  495.         charCode:                SInt16;
  496.     END;
  497.  
  498.     ControlKeyDownPtr                    = ^ControlKeyDownRec;
  499. {——————————————————————————————————————————————————————————————————————————————————————}
  500. { This structure is passed into a CDEF when called with the kControlMsgGetData or        }
  501. { kControlMsgSetData message                                                             }
  502. {——————————————————————————————————————————————————————————————————————————————————————}
  503.     ControlDataAccessRecPtr = ^ControlDataAccessRec;
  504.     ControlDataAccessRec = RECORD
  505.         tag:                    ResType;
  506.         part:                    ResType;
  507.         size:                    Size;
  508.         dataPtr:                Ptr;
  509.     END;
  510.  
  511.     ControlDataAccessPtr                = ^ControlDataAccessRec;
  512. {——————————————————————————————————————————————————————————————————————————————————————}
  513. { This structure is passed into a CDEF when called with the kControlCalcBestRect msg     }
  514. {——————————————————————————————————————————————————————————————————————————————————————}
  515.     ControlCalcSizeRecPtr = ^ControlCalcSizeRec;
  516.     ControlCalcSizeRec = RECORD
  517.         height:                    SInt16;
  518.         width:                    SInt16;
  519.         baseLine:                SInt16;
  520.     END;
  521.  
  522.     ControlCalcSizePtr                    = ^ControlCalcSizeRec;
  523. {——————————————————————————————————————————————————————————————————————————————————————}
  524. { This structure is passed into a CDEF when called with the kControlMsgSetUpBackground }
  525. { message is sent                                                                        }
  526. {——————————————————————————————————————————————————————————————————————————————————————}
  527.     ControlBackgroundRecPtr = ^ControlBackgroundRec;
  528.     ControlBackgroundRec = RECORD
  529.         depth:                    SInt16;
  530.         colorDevice:            BOOLEAN;
  531.     END;
  532.  
  533.     ControlBackgroundPtr                = ^ControlBackgroundRec;
  534. {——————————————————————————————————————————————————————————————————————————————————————}
  535. {    Key Filter                                                                            }
  536. {                                                                                        }
  537. { Definition of a key filter for intercepting and possibly changing keystrokes            }
  538. { which are destined for a control                                                        }
  539. {——————————————————————————————————————————————————————————————————————————————————————}
  540.     ControlKeyFilterProcPtr = ProcPtr;  { FUNCTION ControlKeyFilter(theControl: ControlHandle; VAR keyCode: SInt16; VAR charCode: SInt16; VAR modifiers: SInt16): ControlKeyFilterResult; }
  541.  
  542.     ControlKeyFilterUPP = UniversalProcPtr;
  543.  
  544. CONST
  545.     uppControlKeyFilterProcInfo = $00003FE0;
  546.  
  547. FUNCTION NewControlKeyFilterProc(userRoutine: ControlKeyFilterProcPtr): ControlKeyFilterUPP;
  548.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  549.     INLINE $2E9F;
  550.     {$ENDC}
  551.  
  552. FUNCTION CallControlKeyFilterProc(theControl: ControlHandle; VAR keyCode: SInt16; VAR charCode: SInt16; VAR modifiers: SInt16; userRoutine: ControlKeyFilterUPP): ControlKeyFilterResult;
  553.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  554.     INLINE $205F, $4E90;
  555.     {$ENDC}
  556. {——————————————————————————————————————————————————————————————————————————————————————}
  557. {    • BEVEL BUTTON INTERFACE (CDEF 2)                                                    }
  558. {——————————————————————————————————————————————————————————————————————————————————————}
  559. {    Bevel buttons allow you to control the content type (pict/icon/etc.), the behavior    }
  560. { (pushbutton/toggle/sticky), and the bevel size. You also have the option of            }
  561. {    attaching a menu to it. When a menu is present, you can specify which way the         }
  562. {    popup arrow is facing (down or right).                                                }
  563. {                                                                                        }
  564. {    This is all made possible by overloading the Min, Max, and Value parameters for the    }
  565. {    control, as well as adjusting the variant. Here's the breakdown of what goes where:    }
  566. {                                                                                        }
  567. {    Parameter                    What Goes Here                                            }
  568. {    ———————————————————            ————————————————————————————————————————————————————    }
  569. {    Min                            Hi Byte = Behavior, Lo Byte = content type.                }
  570. {    Max                            ResID for resource-based content types.                    }
  571. {    Value                        MenuID to attach, 0 = no menu, please.                    }
  572. {                                                                                        }
  573. {    The variant is broken down into two halfs. The low 2 bits control the bevel type.    }
  574. {    Bit 2 controls the popup arrow direction (if a menu is present) and bit 3 controls    }
  575. {    whether or not to use the control's owning window's font.                            }
  576. {                                                                                        }
  577. {    Constants for all you need to put this together are below. The values for behaviors    }
  578. {    are set up so that you can simply add them to the content type and pass them into    }
  579. {    the Min parameter of NewControl.                                                    }
  580. {                                                                                        }
  581. {    An example call:                                                                    }
  582. {                                                                                        }
  583. {    control = NewControl( window, &bounds, "\p", true, 0, kContentIconSuiteRes +         }
  584. {                            kBehaviorToggles, myIconSuiteID, bevelButtonSmallBevelProc,    }
  585. {                            0L );                                                        }
  586. {                                                                                        }
  587. {    Attaching a menu:                                                                    }
  588. {                                                                                        }
  589. {    control = NewControl( window, &bounds, "\p", true, kMyMenuID, kContentIconSuiteRes,    }
  590. {            myIconSuiteID, bevelButtonSmallBevelProc + kBevelButtonMenuOnRight, 0L );    }
  591. {                                                                                        }
  592. {    This will attach menu ID kMyMenuID to the button, with the popup arrow facing right.}
  593. {    This also puts the menu up to the right of the button. You can also specify that a    }
  594. {    menu can have multiple items checked at once by adding kBehaviorMultiValueMenus        }
  595. {    into the Min parameter. If you do use multivalue menus, the GetBevelButtonMenuValue    }
  596. {    helper function will return the last item chosen from the menu, whether or not it    }
  597. {    was checked.                                                                        }
  598. {                                                                                        }
  599. {    NOTE:     Bevel buttons with menus actually have *two* values. The value of the         }
  600. {            button (on/off), and the value of the menu. The menu value can be gotten    }
  601. {            with the GetBevelButtonMenuValue helper function.                            }
  602. {                                                                                        }
  603. {    Handle-based Content                                                                }
  604. {    ————————————————————                                                                }
  605. {    You can create your control and then set the content to an existing handle to an    }
  606. {    icon suite, etc. using the macros below. Please keep in mind that resource-based    }
  607. {    content is owned by the control, handle-based content is owned by you. The CDEF will}
  608. {    not try to dispose of handle-based content. If you are changing the content type of    }
  609. {    the button on the fly, you must make sure that if you are replacing a handle-        }
  610. {    based content with a resource-based content to properly dispose of the handle,        }
  611. {    else a memory leak will ensue.                                                        }
  612. {                                                                                        }
  613.  
  614. CONST
  615.                                                                 {  Bevel Button Proc IDs  }
  616.     kControlBevelButtonSmallBevelProc = 32;
  617.     kControlBevelButtonNormalBevelProc = 33;
  618.     kControlBevelButtonLargeBevelProc = 34;
  619.  
  620.                                                                 {  Bevel button graphic alignment values  }
  621.     kControlBevelButtonAlignSysDirection = -1;                    {  only left or right }
  622.     kControlBevelButtonAlignCenter = 0;
  623.     kControlBevelButtonAlignLeft = 1;
  624.     kControlBevelButtonAlignRight = 2;
  625.     kControlBevelButtonAlignTop    = 3;
  626.     kControlBevelButtonAlignBottom = 4;
  627.     kControlBevelButtonAlignTopLeft = 5;
  628.     kControlBevelButtonAlignBottomLeft = 6;
  629.     kControlBevelButtonAlignTopRight = 7;
  630.     kControlBevelButtonAlignBottomRight = 8;
  631.  
  632.  
  633. TYPE
  634.     ControlButtonGraphicAlignment        = SInt16;
  635.  
  636. CONST
  637.                                                                 {  Bevel button text alignment values  }
  638.     kControlBevelButtonAlignTextSysDirection = 0;
  639.     kControlBevelButtonAlignTextCenter = 1;
  640.     kControlBevelButtonAlignTextFlushRight = -1;
  641.     kControlBevelButtonAlignTextFlushLeft = -2;
  642.  
  643.  
  644. TYPE
  645.     ControlButtonTextAlignment            = SInt16;
  646.  
  647. CONST
  648.                                                                 {  Bevel button text placement values  }
  649.     kControlBevelButtonPlaceSysDirection = -1;                    {  if graphic on right, then on left }
  650.     kControlBevelButtonPlaceNormally = 0;
  651.     kControlBevelButtonPlaceToRightOfGraphic = 1;
  652.     kControlBevelButtonPlaceToLeftOfGraphic = 2;
  653.     kControlBevelButtonPlaceBelowGraphic = 3;
  654.     kControlBevelButtonPlaceAboveGraphic = 4;
  655.  
  656.  
  657. TYPE
  658.     ControlButtonTextPlacement            = SInt16;
  659. { Add these variant codes to kBevelButtonSmallBevelProc to change the type of button }
  660.  
  661. CONST
  662.     kControlBevelButtonSmallBevelVariant = 0;
  663.     kControlBevelButtonNormalBevelVariant = $01;
  664.     kControlBevelButtonLargeBevelVariant = $02;
  665.     kControlBevelButtonMenuOnRight = $04;
  666.  
  667. {
  668.    Behaviors of bevel buttons. These are set up so you can add
  669.    them together with the content types.
  670. }
  671.     kControlBehaviorPushbutton    = 0;
  672.     kControlBehaviorToggles        = $0100;
  673.     kControlBehaviorSticky        = $0200;
  674.     kControlBehaviorMultiValueMenu = $4000;                        {  only makes sense when a menu is attached. }
  675.     kControlBehaviorOffsetContents = $8000;
  676.  
  677. {  Content types supported by bevel buttons *and* image wells }
  678.     kControlContentTextOnly        = 0;
  679.     kControlContentIconSuiteRes    = 1;
  680.     kControlContentCIconRes        = 2;
  681.     kControlContentPictRes        = 3;
  682.     kControlContentIconSuiteHandle = 129;
  683.     kControlContentCIconHandle    = 130;
  684.     kControlContentPictHandle    = 131;
  685.     kControlContentIconRef        = 132;
  686.  
  687.  
  688. TYPE
  689.     ControlContentType                    = SInt16;
  690. { Data tags supported by the bevel button controls }
  691.  
  692. CONST
  693.     kControlBevelButtonContentTag = 'cont';                        {  ButtonContentInfo }
  694.     kControlBevelButtonTransformTag = 'tran';                    {  IconTransformType }
  695.     kControlBevelButtonTextAlignTag = 'tali';                    {  ButtonTextAlignment }
  696.     kControlBevelButtonTextOffsetTag = 'toff';                    {  SInt16 }
  697.     kControlBevelButtonGraphicAlignTag = 'gali';                {  ButtonGraphicAlignment }
  698.     kControlBevelButtonGraphicOffsetTag = 'goff';                {  Point }
  699.     kControlBevelButtonTextPlaceTag = 'tplc';                    {  ButtonTextPlacement }
  700.     kControlBevelButtonMenuValueTag = 'mval';                    {  SInt16 }
  701.     kControlBevelButtonMenuHandleTag = 'mhnd';                    {  MenuHandle }
  702.  
  703. { Structure to pass into bevel buttons and image wells to set/get content type }
  704.  
  705. TYPE
  706.     ControlButtonContentInfoPtr = ^ControlButtonContentInfo;
  707.     ControlButtonContentInfo = RECORD
  708.         contentType:            ControlContentType;
  709.         CASE INTEGER OF
  710.         0: (
  711.             resID:                SInt16;
  712.             );
  713.         1: (
  714.             cIconHandle:        CIconHandle;
  715.             );
  716.         2: (
  717.             iconSuite:            Handle;
  718.             );
  719.         3: (
  720.             iconRef:            Handle;
  721.             );
  722.         4: (
  723.             picture:            PicHandle;
  724.             );
  725.     END;
  726.  
  727. {——————————————————————————————————————————————————————————————————————————————————————}
  728. {    • SLIDER (CDEF 3)                                                                    }
  729. {——————————————————————————————————————————————————————————————————————————————————————}
  730. {    There are several variants that control the behavior of the slider control. Any        }
  731. {    combination of the following three constants can be added to the basic CDEF ID        }
  732. {    (kSliderProc).                                                                        }
  733. {                                                                                        }
  734. {    Variants:                                                                            }
  735. {                                                                                        }
  736. {        kSliderLiveFeedback         Slider does not use "ghosted" indicator when tracking.    }
  737. {                                ActionProc is called (set via SetControlAction) as the    }
  738. {                                indicator is dragged. The value is updated so that the    }
  739. {                                actionproc can adjust some other property based on the    }
  740. {                                value each time the action proc is called. If no action    }
  741. {                                proc is installed, it reverts to the ghost indicator.    }
  742. {                                                                                        }
  743. {        kSliderHasTickMarks         Slider is drawn with 'tick marks'. The control            }
  744. {                                rectangle must be large enough to accomidate the tick    }
  745. {                                marks.                                                    }
  746. {
  747. /*        kSliderReverseDirection    Slider thumb points in opposite direction than normal.    }
  748. {                                If the slider is vertical, the thumb will point to the    }
  749. {                                left, if the slider is horizontal, the thumb will point    }
  750. {                                upwards.                                                }
  751. {                                                                                        }
  752. {        kSliderNonDirectional    This option overrides the kSliderReverseDirection and    }
  753. {                                kSliderHasTickMarks variants. It creates an indicator    }
  754. {                                which is rectangular and doesn't point in any direction    }
  755. {                                like the normal indicator does.                            }
  756.  
  757. CONST
  758.                                                                 {  Slider proc IDs  }
  759.     kControlSliderProc            = 48;
  760.     kControlSliderLiveFeedback    = $01;
  761.     kControlSliderHasTickMarks    = $02;
  762.     kControlSliderReverseDirection = $04;
  763.     kControlSliderNonDirectional = $08;
  764.  
  765.  
  766. {——————————————————————————————————————————————————————————————————————————————————————}
  767. {    • DISCLOSURE TRIANGLE (CDEF 4)                                                        }
  768. {——————————————————————————————————————————————————————————————————————————————————————}
  769. {    This control can be used as either left or right facing. It can also handle its own    }
  770. {    tracking if you wish. This means that when the 'autotoggle' variant is used, if the    }
  771. {    user clicks the control, it's state will change automatically from open to closed    }
  772. {    and vice-versa depending on its initial state. After a successful call to Track-    }
  773. {     Control, you can just check the current value to see what state it was switched to.    }
  774.                                                                 {  Triangle proc IDs  }
  775.     kControlTriangleProc        = 64;
  776.     kControlTriangleLeftFacingProc = 65;
  777.     kControlTriangleAutoToggleProc = 66;
  778.     kControlTriangleLeftFacingAutoToggleProc = 67;
  779.  
  780.                                                                 {  Tagged data supported by disclosure triangles  }
  781.     kControlTriangleLastValueTag = 'last';                        {  SInt16 }
  782.  
  783. {——————————————————————————————————————————————————————————————————————————————————————}
  784. {    • PROGRESS INDICATOR (CDEF 5)                                                        }
  785. {——————————————————————————————————————————————————————————————————————————————————————}
  786. {    This CDEF implements both determinate and indeterminate progress bars. To switch,     }
  787. {    just use SetControlData to set the indeterminate flag to make it indeterminate call    }
  788. {    IdleControls to step thru the animation. IdleControls should be called at least        }
  789. {    once during your event loop.                                                        }
  790. {                                                                                        }
  791.                                                                 {  Progress Bar proc IDs  }
  792.     kControlProgressBarProc        = 80;
  793.  
  794.                                                                 {  Tagged data supported by progress bars  }
  795.     kControlProgressBarIndeterminateTag = 'inde';                {  Boolean }
  796.  
  797. {——————————————————————————————————————————————————————————————————————————————————————}
  798. {    • LITTLE ARROWS (CDEF 6)                                                            }
  799. {——————————————————————————————————————————————————————————————————————————————————————}
  800. {     This control implements the little up and down arrows you'd see in the Memory        }
  801. {    control panel for adjusting the cache size.                                         }
  802.                                                                 {  Little Arrows proc IDs  }
  803.     kControlLittleArrowsProc    = 96;
  804.  
  805. {——————————————————————————————————————————————————————————————————————————————————————}
  806. {    • CHASING ARROWS (CDEF 7)                                                            }
  807. {——————————————————————————————————————————————————————————————————————————————————————}
  808. {    To animate this control, make sure to call IdleControls repeatedly.                    }
  809. {                                                                                        }
  810.                                                                 {  Chasing Arrows proc IDs  }
  811.     kControlChasingArrowsProc    = 112;
  812.  
  813. {——————————————————————————————————————————————————————————————————————————————————————}
  814. {    • TABS (CDEF 8)                                                                        }
  815. {——————————————————————————————————————————————————————————————————————————————————————}
  816. {    Tabs use an auxiliary resource (tab#) to hold tab information such as the tab name    }
  817. {    and an icon suite ID for each tab.                                                    }
  818. {                                                                                        }
  819. {    The ID of the tab# resource that you wish to associate with a tab control should     }
  820. {    be passed in as the Value parameter of the control. If you are using GetNewControl, }
  821. {    then the Value slot in the CNTL resource should have the ID of the 'tab#' resource    }
  822. {    on creation.                                                                        }
  823. {                                                                                        }
  824.                                                                 {  Tabs proc IDs  }
  825.     kControlTabLargeProc        = 128;                            {  Large tab size     }
  826.     kControlTabSmallProc        = 129;                            {  Small tab size     }
  827.  
  828.                                                                 {  Tagged data supported by progress bars  }
  829.     kControlTabContentRectTag    = 'rect';                        {  Rect }
  830.     kControlTabEnabledFlagTag    = 'enab';                        {  Boolean }
  831.     kControlTabFontStyleTag        = 'font';                        {  ControlFontStyleRec }
  832.  
  833. {——————————————————————————————————————————————————————————————————————————————————————}
  834. {    • VISUAL SEPARATOR (CDEF 9)                                                            }
  835. {——————————————————————————————————————————————————————————————————————————————————————}
  836. {    Separator lines determine their orientation (horizontal or vertical) automatically    }
  837. {    based on the relative height and width of their contrlRect.                            }
  838.                                                                 {  Visual separator proc IDs  }
  839.     kControlSeparatorLineProc    = 144;
  840.  
  841.  
  842. {——————————————————————————————————————————————————————————————————————————————————————}
  843. {    • GROUP BOX (CDEF 10)                                                                }
  844. {——————————————————————————————————————————————————————————————————————————————————————}
  845. {    The group box CDEF can be use in several ways. It can have no title, a text title,     }
  846. {    a check box as the title, or a popup button as a title. There are two versions of     }
  847. {    group boxes, primary and secondary, which look slightly different.                    }
  848.                                                                 {  Group Box proc IDs  }
  849.     kControlGroupBoxTextTitleProc = 160;
  850.     kControlGroupBoxCheckBoxProc = 161;
  851.     kControlGroupBoxPopupButtonProc = 162;
  852.     kControlGroupBoxSecondaryTextTitleProc = 164;
  853.     kControlGroupBoxSecondaryCheckBoxProc = 165;
  854.     kControlGroupBoxSecondaryPopupButtonProc = 166;
  855.  
  856.                                                                 {  Tagged data supported by group box  }
  857.     kControlGroupBoxMenuHandleTag = 'mhan';                        {  MenuHandle (popup title only) }
  858.     kControlGroupBoxFontStyleTag = 'font';                        {  ControlFontStyleRec }
  859.  
  860. {——————————————————————————————————————————————————————————————————————————————————————}
  861. {    • IMAGE WELL (CDEF 11)                                                                }
  862. {——————————————————————————————————————————————————————————————————————————————————————}
  863. {    Image Wells allow you to control the content type (pict/icon/etc.) shown in the     }
  864. {    well.                                                                                }
  865. {                                                                                        }
  866. {    This is made possible by overloading the Min and Value parameters for the control.    }
  867. {                                                                                        }
  868. {    Parameter                    What Goes Here                                            }
  869. {    ———————————————————            ——————————————————————————————————————————————————        }
  870. {    Min                            content type (see constants for bevel buttons)            }
  871. {    Value                        Resource ID of content type, if resource-based.            }
  872. {                                                                                        }
  873. {                                                                                        }
  874. {    Checked State                                                                        }
  875. {    —————————————                                                                        }
  876. {    The checked state is enabled by setting the value of the control to 1, just like a     }
  877. {    check box.                                                                            }
  878. {                                                                                        }
  879. {    Handle-based Content                                                                }
  880. {    ————————————————————                                                                }
  881. {    You can create your control and then set the content to an existing handle to an    }
  882. {    icon suite, etc. using the macros below. Please keep in mind that resource-based    }
  883. {    content is owned by the control, handle-based content is owned by you. The CDEF will}
  884. {    not try to dispose of handle-based content. If you are changing the content type of    }
  885. {    the button on the fly, you must make sure that if you are replacing a handle-        }
  886. {    based content with a resource-based content to properly dispose of the handle,        }
  887. {    else a memory leak will ensue.                                                        }
  888. {                                                                                        }
  889. {                                                                                        }
  890. {    AutoTracking                                                                        }
  891. {    ————————————                                                                        }
  892. {    Image Wells are capable of autotracking. The current autotracking feature sets the     }
  893. {    value itself, so that the control remains hilited. It behaves as a sort of palette     }
  894. {    type object where clicking selects it, it cannot be delected by clicking it again,     }
  895. {    clicking on another object should cause the focus to change (as in Get Info windows)}
  896. {    and the application should then set the value to 0 to take away the checked border.    }
  897. {                                                                                        }
  898.                                                                 {  Image Well proc IDs  }
  899.     kControlImageWellProc        = 176;
  900.     kControlImageWellAutoTrackProc = 177;
  901.  
  902.                                                                 {  Tagged data supported by image wells  }
  903.     kControlImageWellContentTag    = 'cont';                        {  ButtonContentInfo }
  904.     kControlImageWellTransformTag = 'tran';                        {  IconTransformType }
  905.  
  906. {——————————————————————————————————————————————————————————————————————————————————————}
  907. {    • POPUP ARROW (CDEF 12)                                                                }
  908. {——————————————————————————————————————————————————————————————————————————————————————}
  909. {    The popup arrow CDEF is used to draw the small arrow normally associated with a     }
  910. {    popup control. The arrow can point in four directions, and a small or large version }
  911. {    can be used. This control is provided to allow clients to draw the arrow in a         }
  912. {    normalized fashion which will take advantage of themes automatically.                }
  913. {                                                                                        }
  914.                                                                 {  Popup Arrow proc IDs  }
  915.     kControlPopupArrowEastProc    = 192;
  916.     kControlPopupArrowWestProc    = 193;
  917.     kControlPopupArrowNorthProc    = 194;
  918.     kControlPopupArrowSouthProc    = 195;
  919.     kControlPopupArrowSmallEastProc = 196;
  920.     kControlPopupArrowSmallWestProc = 197;
  921.     kControlPopupArrowSmallNorthProc = 198;
  922.     kControlPopupArrowSmallSouthProc = 199;
  923.  
  924. {——————————————————————————————————————————————————————————————————————————————————————}
  925. {    • PLACARD (CDEF 14)                                                                    }
  926. {——————————————————————————————————————————————————————————————————————————————————————}
  927.                                                                 {  Placard proc IDs  }
  928.     kControlPlacardProc            = 224;
  929.  
  930. {——————————————————————————————————————————————————————————————————————————————————————}
  931. {    • CLOCK (CDEF 15)                                                                    }
  932. {——————————————————————————————————————————————————————————————————————————————————————}
  933. {     NOTE:    You can specify more options in the Value paramter when creating the clock.    }
  934. {            See below.                                                                    }
  935.                                                                 {  Clock proc IDs  }
  936.     kControlClockTimeProc        = 240;
  937.     kControlClockTimeSecondsProc = 241;
  938.     kControlClockDateProc        = 242;
  939.     kControlClockMonthYearProc    = 243;
  940.  
  941. {——————————————————————————————————————————————————————————————————————————————————————}
  942. {     These flags can be passed into 'value' field on creation of the control.            }
  943. {     Value is set to 0 after control is created.                                            }
  944. {                                                                                        }
  945. {    The kClockIsLive value tells the clock to automatically update on idle (clock will    }
  946. {    have the current time). This flag is only valid when the kClockIsDisplayOnly flag    }
  947. {    is set.                                                                                }
  948. {——————————————————————————————————————————————————————————————————————————————————————}
  949.     kControlClockNoFlags        = 0;
  950.     kControlClockIsDisplayOnly    = 1;
  951.     kControlClockIsLive            = 2;
  952.  
  953.                                                                 {  Tagged data supported by clocks  }
  954.     kControlClockLongDateTag    = 'date';                        {  LongDateRec }
  955.     kControlClockFontStyleTag    = 'font';                        {  ControlFontStyleRec }
  956.  
  957. {——————————————————————————————————————————————————————————————————————————————————————}
  958. {    • USER PANE (CDEF 16)                                                                }
  959. {——————————————————————————————————————————————————————————————————————————————————————}
  960.                                                                 {  User Pane proc IDs  }
  961.     kControlUserPaneProc        = 256;
  962.  
  963. { Tagged data supported by user panes }
  964. { Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. }
  965.     kControlUserItemDrawProcTag    = 'uidp';                        {  UserItemUPP }
  966.     kControlUserPaneDrawProcTag    = 'draw';                        {  ControlUserPaneDrawingUPP }
  967.     kControlUserPaneHitTestProcTag = 'hitt';                    {  ControlUserPaneHitTestUPP }
  968.     kControlUserPaneTrackingProcTag = 'trak';                    {  ControlUserPaneTrackingUPP }
  969.     kControlUserPaneIdleProcTag    = 'idle';                        {  ControlUserPaneIdleUPP }
  970.     kControlUserPaneKeyDownProcTag = 'keyd';                    {  ControlUserPaneKeyDownUPP }
  971.     kControlUserPaneActivateProcTag = 'acti';                    {  ControlUserPaneActivateUPP }
  972.     kControlUserPaneFocusProcTag = 'foci';                        {  ControlUserPaneFocusUPP }
  973.     kControlUserPaneBackgroundProcTag = 'back';                    {  ControlUserPaneBackgroundUPP }
  974.  
  975.  
  976. TYPE
  977.     ControlUserPaneDrawProcPtr = ProcPtr;  { PROCEDURE ControlUserPaneDraw(control: ControlHandle; part: SInt16); }
  978.  
  979.     ControlUserPaneHitTestProcPtr = ProcPtr;  { FUNCTION ControlUserPaneHitTest(control: ControlHandle; where: Point): ControlPartCode; }
  980.  
  981.     ControlUserPaneTrackingProcPtr = ProcPtr;  { FUNCTION ControlUserPaneTracking(control: ControlHandle; startPt: Point; actionProc: ControlActionUPP): ControlPartCode; }
  982.  
  983.     ControlUserPaneIdleProcPtr = ProcPtr;  { PROCEDURE ControlUserPaneIdle(control: ControlHandle); }
  984.  
  985.     ControlUserPaneKeyDownProcPtr = ProcPtr;  { FUNCTION ControlUserPaneKeyDown(control: ControlHandle; keyCode: SInt16; charCode: SInt16; modifiers: SInt16): ControlPartCode; }
  986.  
  987.     ControlUserPaneActivateProcPtr = ProcPtr;  { PROCEDURE ControlUserPaneActivate(control: ControlHandle; activating: BOOLEAN); }
  988.  
  989.     ControlUserPaneFocusProcPtr = ProcPtr;  { FUNCTION ControlUserPaneFocus(control: ControlHandle; action: ControlFocusPart): ControlPartCode; }
  990.  
  991.     ControlUserPaneBackgroundProcPtr = ProcPtr;  { PROCEDURE ControlUserPaneBackground(control: ControlHandle; info: ControlBackgroundPtr); }
  992.  
  993.     ControlUserPaneDrawUPP = UniversalProcPtr;
  994.     ControlUserPaneHitTestUPP = UniversalProcPtr;
  995.     ControlUserPaneTrackingUPP = UniversalProcPtr;
  996.     ControlUserPaneIdleUPP = UniversalProcPtr;
  997.     ControlUserPaneKeyDownUPP = UniversalProcPtr;
  998.     ControlUserPaneActivateUPP = UniversalProcPtr;
  999.     ControlUserPaneFocusUPP = UniversalProcPtr;
  1000.     ControlUserPaneBackgroundUPP = UniversalProcPtr;
  1001.  
  1002. CONST
  1003.     uppControlUserPaneDrawProcInfo = $000002C0;
  1004.     uppControlUserPaneHitTestProcInfo = $000003E0;
  1005.     uppControlUserPaneTrackingProcInfo = $00000FE0;
  1006.     uppControlUserPaneIdleProcInfo = $000000C0;
  1007.     uppControlUserPaneKeyDownProcInfo = $00002AE0;
  1008.     uppControlUserPaneActivateProcInfo = $000001C0;
  1009.     uppControlUserPaneFocusProcInfo = $000002E0;
  1010.     uppControlUserPaneBackgroundProcInfo = $000003C0;
  1011.  
  1012. FUNCTION NewControlUserPaneDrawProc(userRoutine: ControlUserPaneDrawProcPtr): ControlUserPaneDrawUPP;
  1013.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1014.     INLINE $2E9F;
  1015.     {$ENDC}
  1016.  
  1017. FUNCTION NewControlUserPaneHitTestProc(userRoutine: ControlUserPaneHitTestProcPtr): ControlUserPaneHitTestUPP;
  1018.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1019.     INLINE $2E9F;
  1020.     {$ENDC}
  1021.  
  1022. FUNCTION NewControlUserPaneTrackingProc(userRoutine: ControlUserPaneTrackingProcPtr): ControlUserPaneTrackingUPP;
  1023.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1024.     INLINE $2E9F;
  1025.     {$ENDC}
  1026.  
  1027. FUNCTION NewControlUserPaneIdleProc(userRoutine: ControlUserPaneIdleProcPtr): ControlUserPaneIdleUPP;
  1028.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1029.     INLINE $2E9F;
  1030.     {$ENDC}
  1031.  
  1032. FUNCTION NewControlUserPaneKeyDownProc(userRoutine: ControlUserPaneKeyDownProcPtr): ControlUserPaneKeyDownUPP;
  1033.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1034.     INLINE $2E9F;
  1035.     {$ENDC}
  1036.  
  1037. FUNCTION NewControlUserPaneActivateProc(userRoutine: ControlUserPaneActivateProcPtr): ControlUserPaneActivateUPP;
  1038.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1039.     INLINE $2E9F;
  1040.     {$ENDC}
  1041.  
  1042. FUNCTION NewControlUserPaneFocusProc(userRoutine: ControlUserPaneFocusProcPtr): ControlUserPaneFocusUPP;
  1043.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1044.     INLINE $2E9F;
  1045.     {$ENDC}
  1046.  
  1047. FUNCTION NewControlUserPaneBackgroundProc(userRoutine: ControlUserPaneBackgroundProcPtr): ControlUserPaneBackgroundUPP;
  1048.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1049.     INLINE $2E9F;
  1050.     {$ENDC}
  1051.  
  1052. PROCEDURE CallControlUserPaneDrawProc(control: ControlHandle; part: SInt16; userRoutine: ControlUserPaneDrawUPP);
  1053.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1054.     INLINE $205F, $4E90;
  1055.     {$ENDC}
  1056.  
  1057. FUNCTION CallControlUserPaneHitTestProc(control: ControlHandle; where: Point; userRoutine: ControlUserPaneHitTestUPP): ControlPartCode;
  1058.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1059.     INLINE $205F, $4E90;
  1060.     {$ENDC}
  1061.  
  1062. FUNCTION CallControlUserPaneTrackingProc(control: ControlHandle; startPt: Point; actionProc: ControlActionUPP; userRoutine: ControlUserPaneTrackingUPP): ControlPartCode;
  1063.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1064.     INLINE $205F, $4E90;
  1065.     {$ENDC}
  1066.  
  1067. PROCEDURE CallControlUserPaneIdleProc(control: ControlHandle; userRoutine: ControlUserPaneIdleUPP);
  1068.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1069.     INLINE $205F, $4E90;
  1070.     {$ENDC}
  1071.  
  1072. FUNCTION CallControlUserPaneKeyDownProc(control: ControlHandle; keyCode: SInt16; charCode: SInt16; modifiers: SInt16; userRoutine: ControlUserPaneKeyDownUPP): ControlPartCode;
  1073.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1074.     INLINE $205F, $4E90;
  1075.     {$ENDC}
  1076.  
  1077. PROCEDURE CallControlUserPaneActivateProc(control: ControlHandle; activating: BOOLEAN; userRoutine: ControlUserPaneActivateUPP);
  1078.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1079.     INLINE $205F, $4E90;
  1080.     {$ENDC}
  1081.  
  1082. FUNCTION CallControlUserPaneFocusProc(control: ControlHandle; action: ControlFocusPart; userRoutine: ControlUserPaneFocusUPP): ControlPartCode;
  1083.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1084.     INLINE $205F, $4E90;
  1085.     {$ENDC}
  1086.  
  1087. PROCEDURE CallControlUserPaneBackgroundProc(control: ControlHandle; info: ControlBackgroundPtr; userRoutine: ControlUserPaneBackgroundUPP);
  1088.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1089.     INLINE $205F, $4E90;
  1090.     {$ENDC}
  1091. {
  1092.   ——————————————————————————————————————————————————————————————————————————————————————————
  1093.       • EDIT TEXT (CDEF 17)
  1094.   ——————————————————————————————————————————————————————————————————————————————————————————
  1095. }
  1096.  
  1097. CONST
  1098.                                                                 {  Edit Text proc IDs  }
  1099.     kControlEditTextProc        = 272;
  1100.     kControlEditTextDialogProc    = 273;
  1101.     kControlEditTextPasswordProc = 274;
  1102.  
  1103.                                                                 {  Tagged data supported by edit text  }
  1104.     kControlEditTextStyleTag    = 'font';                        {  ControlFontStyleRec }
  1105.     kControlEditTextTextTag        = 'text';                        {  Buffer of chars - you supply the buffer }
  1106.     kControlEditTextTEHandleTag    = 'than';                        {  The TEHandle of the text edit record }
  1107.     kControlEditTextKeyFilterTag = 'fltr';
  1108.     kControlEditTextSelectionTag = 'sele';                        {  EditTextSelectionRec }
  1109.     kControlEditTextPasswordTag    = 'pass';                        {  The clear text password text }
  1110.  
  1111.  
  1112. TYPE
  1113.     ControlEditTextSelectionRecPtr = ^ControlEditTextSelectionRec;
  1114.     ControlEditTextSelectionRec = RECORD
  1115.                                                                         {  Structure for getting the edit text selection  }
  1116.         selStart:                SInt16;
  1117.         selEnd:                    SInt16;
  1118.     END;
  1119.  
  1120.     ControlEditTextSelectionPtr            = ^ControlEditTextSelectionRec;
  1121. {——————————————————————————————————————————————————————————————————————————————————————}
  1122. {    • STATIC TEXT (CDEF 18)                                                                }
  1123. {——————————————————————————————————————————————————————————————————————————————————————}
  1124. { Static Text proc IDs }
  1125.  
  1126. CONST
  1127.     kControlStaticTextProc        = 288;
  1128.  
  1129. { Tagged data supported by static text }
  1130.     kControlStaticTextStyleTag    = 'font';                        {  ControlFontStyleRec }
  1131.     kControlStaticTextTextTag    = 'text';                        {  Copy of text }
  1132.     kControlStaticTextTextHeightTag = 'thei';                    {  SInt16 }
  1133.  
  1134. {——————————————————————————————————————————————————————————————————————————————————————}
  1135. {    • PICTURE CONTROL (CDEF 19)                                                            }
  1136. {——————————————————————————————————————————————————————————————————————————————————————}
  1137. {    Value parameter should contain the ID of the picture you wish to display when        }
  1138. {    creating controls of this type. If you don't want the control tracked at all, use     }
  1139. {    the 'no track' variant.                                                                }
  1140.                                                                 {  Picture control proc IDs  }
  1141.     kControlPictureProc            = 304;
  1142.     kControlPictureNoTrackProc    = 305;                            {  immediately returns kControlPicturePart }
  1143.  
  1144. {——————————————————————————————————————————————————————————————————————————————————————}
  1145. {    • ICON CONTROL (CDEF 20)                                                            }
  1146. {——————————————————————————————————————————————————————————————————————————————————————}
  1147. {    Value parameter should contain the ID of the ICON or cicn you wish to display when    }
  1148. {    creating controls of this type. If you don't want the control tracked at all, use     }
  1149. {    the 'no track' variant.                                                                }
  1150. { Icon control proc IDs }
  1151.     kControlIconProc            = 320;
  1152.     kControlIconNoTrackProc        = 321;                            {  immediately returns kControlIconPart }
  1153.     kControlIconSuiteProc        = 322;
  1154.     kControlIconSuiteNoTrackProc = 323;                            {  immediately returns kControlIconPart }
  1155.  
  1156. { Tagged data supported by icon controls }
  1157.     kControlIconTransformTag    = 'trfm';                        {  IconTransformType }
  1158.     kControlIconAlignmentTag    = 'algn';                        {  IconAlignmentType }
  1159.  
  1160. {——————————————————————————————————————————————————————————————————————————————————————}
  1161. {    • WINDOW HEADER (CDEF 21)                                                            }
  1162. {——————————————————————————————————————————————————————————————————————————————————————}
  1163.                                                                 {  Window Header proc IDs  }
  1164.     kControlWindowHeaderProc    = 336;                            {  normal header }
  1165.     kControlWindowListViewHeaderProc = 337;                        {  variant for list views - no bottom line }
  1166.  
  1167. {——————————————————————————————————————————————————————————————————————————————————————}
  1168. {    • LIST BOX (CDEF 22)                                                                }
  1169. {——————————————————————————————————————————————————————————————————————————————————————}
  1170. {    Lists use an auxiliary resource to define their format. The resource type used is     }
  1171. {    'ldes' and a definition for it can be found in Appearance.r. The resource ID for     }
  1172. {    the ldes is passed in the 'value' parameter when creating the control.                }
  1173.                                                                 {  List Box proc IDs  }
  1174.     kControlListBoxProc            = 352;
  1175.     kControlListBoxAutoSizeProc    = 353;
  1176.  
  1177.                                                                 {  Tagged data supported by list box  }
  1178.     kControlListBoxListHandleTag = 'lhan';                        {  ListHandle }
  1179.     kControlListBoxKeyFilterTag    = 'fltr';                        {  ControlKeyFilterUPP }
  1180.     kControlListBoxFontStyleTag    = 'font';                        {  ControlFontStyleRec }
  1181.  
  1182. {——————————————————————————————————————————————————————————————————————————————————————}
  1183. {    • PUSH BUTTON (CDEF 23)                                                                }
  1184. {——————————————————————————————————————————————————————————————————————————————————————}
  1185. {    The new standard checkbox and radio button controls support a "mixed" value that    }
  1186. {    indicates that the current setting contains a mixed set of on and off values. The     }
  1187. {    control value used to display this indication is defined in Controls.h:                }
  1188. {                                                                                        }
  1189. {        kControlCheckBoxMixedValue = 2                                                    }
  1190. {                                                                                        }
  1191. {    Two new variants of the standard pushbutton have been added to the standard control    }
  1192. {    suite that draw a color icon next to the control title. One variant draws the icon    }
  1193. {    on the left side, the other draws it on the right side (when the system justifica-    }
  1194. {    tion is right to left, these are reversed).                                            }
  1195. {                                                                                        }
  1196. {    When either of the icon pushbuttons are created, the contrlMax field of the control }
  1197. {    record is used to determine the ID of the 'cicn' resource drawn in the pushbutton.    }
  1198. {                                                                                        }
  1199. {    In addition, a push button can now be told to draw with a default outline using the    }
  1200. {    SetControlData routine with the kPushButtonDefaultTag below.                        }
  1201. {                                                                                        }
  1202.                                                                 {  Theme Push Button/Check Box/Radio Button proc IDs  }
  1203.     kControlPushButtonProc        = 368;
  1204.     kControlCheckBoxProc        = 369;
  1205.     kControlRadioButtonProc        = 370;
  1206.     kControlPushButLeftIconProc    = 374;                            {  Standard pushbutton with left-side icon }
  1207.     kControlPushButRightIconProc = 375;                            {  Standard pushbutton with right-side icon }
  1208.  
  1209.                                                                 {  Tagged data supported by standard buttons  }
  1210.     kControlPushButtonDefaultTag = 'dflt';                        {  default ring flag }
  1211.  
  1212. {——————————————————————————————————————————————————————————————————————————————————————}
  1213. {    • SCROLL BAR (CDEF 24)                                                                }
  1214. {——————————————————————————————————————————————————————————————————————————————————————}
  1215. {    This is the new Appearance scroll bar.                                                }
  1216. {                                                                                        }
  1217.                                                                 {  Theme Scroll Bar proc IDs  }
  1218.     kControlScrollBarProc        = 384;                            {  normal scroll bar }
  1219.     kControlScrollBarLiveProc    = 386;                            {  live scrolling variant }
  1220.  
  1221. {——————————————————————————————————————————————————————————————————————————————————————}
  1222. {    • POPUP BUTTON (CDEF 25)                                                            }
  1223. {——————————————————————————————————————————————————————————————————————————————————————}
  1224. {    This is the new Appearance Popup Button. It takes the same variants and does the     }
  1225. {    same overloading as the previous popup menu control. There are some differences:    }
  1226. {                                                                                        }
  1227. {    Passing in a menu ID of -12345 causes the popup not to try and get the menu from a    }
  1228. {    resource. Instead, you can build the menu and later stuff the menuhandle field in     }
  1229. {    the popup data information.                                                            }
  1230. {                                                                                        }
  1231. {    You can pass -1 in the Max parameter to have the control calculate the width of the    }
  1232. {    title on its own instead of guessing and then tweaking to get it right. It adds the    }
  1233. {    appropriate amount of space between the title and the popup.                        }
  1234. {                                                                                        }
  1235.                                                                 {  Theme Popup Button proc IDs  }
  1236.     kControlPopupButtonProc        = 400;
  1237.     kControlPopupFixedWidthVariant = $01;
  1238.     kControlPopupVariableWidthVariant = $02;
  1239.     kControlPopupUseAddResMenuVariant = $04;
  1240.     kControlPopupUseWFontVariant = $08;
  1241.  
  1242. {——————————————————————————————————————————————————————————————————————————————————}
  1243. { Menu Manager constants, etc.                                                        }
  1244. {——————————————————————————————————————————————————————————————————————————————————}
  1245.     kMenuStdMenuProc            = 63;
  1246.     kMenuStdMenuBarProc            = 63;
  1247.  
  1248.     kMenuNoModifiers            = 0;                            {  Mask for no modifiers }
  1249.     kMenuShiftModifier            = $01;                            {  Mask for shift key modifier }
  1250.     kMenuOptionModifier            = $02;                            {  Mask for option key modifier }
  1251.     kMenuControlModifier        = $04;                            {  Mask for control key modifier }
  1252.     kMenuNoCommandModifier        = $08;                            {  Mask for no command key modifier }
  1253.  
  1254.     kMenuNoIcon                    = 0;                            {  No icon }
  1255.     kMenuIconType                = 1;                            {  Type for ICON }
  1256.     kMenuShrinkIconType            = 2;                            {  Type for ICON plotted 16 x 16 }
  1257.     kMenuSmallIconType            = 3;                            {  Type for SICN }
  1258.     kMenuColorIconType            = 4;                            {  Type for cicn }
  1259.     kMenuIconSuiteType            = 5;                            {  Type for Icon Suite }
  1260.     kMenuIconRefType            = 6;                            {  Type for Icon Ref }
  1261.  
  1262. {——————————————————————————————————————————————————————————————————————————————————}
  1263. {    Appearance Manager APIs                                                            }
  1264. {——————————————————————————————————————————————————————————————————————————————————}
  1265. { Registering Appearance-Savvy Applications }
  1266. FUNCTION RegisterAppearanceClient: OSStatus;
  1267.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1268.     INLINE $303C, $0015, $AA74;
  1269.     {$ENDC}
  1270. FUNCTION UnregisterAppearanceClient: OSStatus;
  1271.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1272.     INLINE $303C, $0016, $AA74;
  1273.     {$ENDC}
  1274. {****************************************************************************
  1275.     NOTES ON THEME BRUSHES
  1276.     Theme brushes can be either colors or patterns, depending on the theme.
  1277.     Because of this, you should be prepared to handle the case where a brush
  1278.     is a pattern and save and restore the pnPixPat and bkPixPat fields of
  1279.     your GrafPorts when saving the fore and back colors. Also, since patterns
  1280.     in bkPixPat override the background color of the window, you should use
  1281.     BackPat to set your background pattern to a normal white pattern. This
  1282.     will ensure that you can use RGBBackColor to set your back color to white,
  1283.     call EraseRect and get the expected results.
  1284. ****************************************************************************}
  1285.  
  1286. FUNCTION SetThemePen(brush: ThemeBrush; depth: SInt16; colorDevice: BOOLEAN): OSStatus;
  1287.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1288.     INLINE $303C, $0001, $AA74;
  1289.     {$ENDC}
  1290. FUNCTION SetThemeBackground(brush: ThemeBrush; depth: SInt16; colorDevice: BOOLEAN): OSStatus;
  1291.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1292.     INLINE $303C, $0002, $AA74;
  1293.     {$ENDC}
  1294. FUNCTION SetThemeTextColor(color: ThemeTextColor; depth: SInt16; colorDevice: BOOLEAN): OSStatus;
  1295.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1296.     INLINE $303C, $0003, $AA74;
  1297.     {$ENDC}
  1298. FUNCTION SetThemeWindowBackground(window: WindowPtr; brush: ThemeBrush; update: BOOLEAN): OSStatus;
  1299.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1300.     INLINE $303C, $0004, $AA74;
  1301.     {$ENDC}
  1302.  
  1303. { Window Placards, Headers and Frames }
  1304. FUNCTION DrawThemeWindowHeader({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1305.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1306.     INLINE $303C, $0005, $AA74;
  1307.     {$ENDC}
  1308. FUNCTION DrawThemeWindowListViewHeader({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1309.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1310.     INLINE $303C, $0006, $AA74;
  1311.     {$ENDC}
  1312. FUNCTION DrawThemePlacard({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1313.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1314.     INLINE $303C, $0007, $AA74;
  1315.     {$ENDC}
  1316. FUNCTION DrawThemeEditTextFrame({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1317.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1318.     INLINE $303C, $0009, $AA74;
  1319.     {$ENDC}
  1320. FUNCTION DrawThemeListBoxFrame({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1321.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1322.     INLINE $303C, $000A, $AA74;
  1323.     {$ENDC}
  1324. { Keyboard Focus Drawing }
  1325. FUNCTION DrawThemeFocusRect({CONST}VAR rect: Rect; hasFocus: BOOLEAN): OSStatus;
  1326.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1327.     INLINE $303C, $000B, $AA74;
  1328.     {$ENDC}
  1329. { Dialog Group Boxes and Separators }
  1330. FUNCTION DrawThemePrimaryGroup({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1331.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1332.     INLINE $303C, $000C, $AA74;
  1333.     {$ENDC}
  1334. FUNCTION DrawThemeSecondaryGroup({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1335.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1336.     INLINE $303C, $000D, $AA74;
  1337.     {$ENDC}
  1338. FUNCTION DrawThemeSeparator({CONST}VAR rect: Rect; state: ThemeDrawState): OSStatus;
  1339.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1340.     INLINE $303C, $000E, $AA74;
  1341.     {$ENDC}
  1342.  
  1343. {——————————————————————————————————————————————————————————————————————————————————}
  1344. {    Window Manager APIs                                                                }
  1345. {——————————————————————————————————————————————————————————————————————————————————}
  1346. FUNCTION GetWindowFeatures(window: WindowPtr; VAR features: UInt32): OSStatus;
  1347.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1348.     INLINE $303C, $0013, $AA74;
  1349.     {$ENDC}
  1350. FUNCTION IsWindowCollapsable(window: WindowPtr): BOOLEAN;
  1351.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1352.     INLINE $303C, $000F, $AA74;
  1353.     {$ENDC}
  1354. FUNCTION IsWindowCollapsed(window: WindowPtr): BOOLEAN;
  1355.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1356.     INLINE $303C, $0010, $AA74;
  1357.     {$ENDC}
  1358. FUNCTION CollapseWindow(window: WindowPtr; collapseIt: BOOLEAN): OSStatus;
  1359.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1360.     INLINE $303C, $0011, $AA74;
  1361.     {$ENDC}
  1362. FUNCTION CollapseAllWindows(collapseEm: BOOLEAN): OSStatus;
  1363.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1364.     INLINE $303C, $0012, $AA74;
  1365.     {$ENDC}
  1366. FUNCTION GetWindowRegion(window: WindowPtr; regionCode: WindowRegionCode; winRgn: RgnHandle): OSStatus;
  1367.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1368.     INLINE $303C, $0014, $AA74;
  1369.     {$ENDC}
  1370. {——————————————————————————————————————————————————————————————————————————————————}
  1371. {    Dialog Manager APIs                                                                }
  1372. {——————————————————————————————————————————————————————————————————————————————————}
  1373. FUNCTION NewFeaturesDialog(wStorage: UNIV Ptr; {CONST}VAR boundsRect: Rect; title: ConstStr255Param; visible: BOOLEAN; procID: SInt16; behind: WindowPtr; goAwayFlag: BOOLEAN; refCon: SInt32; itmLstHndl: Handle; flags: UInt32): DialogPtr;
  1374.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1375.     INLINE $303C, $110C, $AA68;
  1376.     {$ENDC}
  1377. FUNCTION AutoSizeDialog(dialog: DialogPtr): OSErr;
  1378.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1379.     INLINE $303C, $020D, $AA68;
  1380.     {$ENDC}
  1381. FUNCTION StandardAlert(alertType: AlertType; error: StringPtr; explanation: StringPtr; alertParam: AlertStdAlertParamPtr; VAR itemHit: SInt16): OSErr;
  1382.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1383.     INLINE $303C, $090E, $AA68;
  1384.     {$ENDC}
  1385. FUNCTION GetDialogItemAsControl(dialog: DialogPtr; itemNo: SInt16; VAR control: ControlHandle): OSErr;
  1386.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1387.     INLINE $303C, $050F, $AA68;
  1388.     {$ENDC}
  1389. FUNCTION MoveDialogItem(dialog: DialogPtr; itemNo: SInt16; horiz: SInt16; vert: SInt16): OSErr;
  1390.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1391.     INLINE $303C, $0510, $AA68;
  1392.     {$ENDC}
  1393. FUNCTION SizeDialogItem(dialog: DialogPtr; itemNo: SInt16; height: SInt16; width: SInt16): OSErr;
  1394.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1395.     INLINE $303C, $0511, $AA68;
  1396.     {$ENDC}
  1397. {——————————————————————————————————————————————————————————————————————————————————}
  1398. {    Control Manager APIs                                                            }
  1399. {——————————————————————————————————————————————————————————————————————————————————}
  1400. {
  1401.    These routines are available only thru the shared library/glue
  1402.    Bevel button routines
  1403. }
  1404.  
  1405. FUNCTION GetBevelButtonMenuValue(button: ControlHandle; VAR value: SInt16): OSErr;
  1406. FUNCTION SetBevelButtonMenuValue(button: ControlHandle; value: SInt16): OSErr;
  1407. FUNCTION GetBevelButtonMenuHandle(button: ControlHandle; VAR handle: MenuHandle): OSErr;
  1408. FUNCTION GetBevelButtonContentInfo(button: ControlHandle; content: ControlButtonContentInfoPtr): OSErr;
  1409. FUNCTION SetBevelButtonContentInfo(button: ControlHandle; content: ControlButtonContentInfoPtr): OSErr;
  1410. FUNCTION SetBevelButtonTransform(button: ControlHandle; transform: IconTransformType): OSErr;
  1411. FUNCTION SetBevelButtonGraphicAlignment(button: ControlHandle; align: ControlButtonGraphicAlignment; hOffset: SInt16; vOffset: SInt16): OSErr;
  1412. FUNCTION SetBevelButtonTextAlignment(button: ControlHandle; align: ControlButtonTextAlignment; hOffset: SInt16): OSErr;
  1413. FUNCTION SetBevelButtonTextPlacement(button: ControlHandle; where: ControlButtonTextPlacement): OSErr;
  1414. {  Image well routines }
  1415.  
  1416. FUNCTION GetImageWellContentInfo(button: ControlHandle; content: ControlButtonContentInfoPtr): OSErr;
  1417. FUNCTION SetImageWellContentInfo(button: ControlHandle; content: ControlButtonContentInfoPtr): OSErr;
  1418. FUNCTION SetImageWellTransform(button: ControlHandle; transform: IconTransformType): OSErr;
  1419. {  Tab routines }
  1420.  
  1421. FUNCTION GetTabContentRect(tabControl: ControlHandle; VAR contentRect: Rect): OSErr;
  1422. FUNCTION SetTabEnabled(tabControl: ControlHandle; tabToHilite: SInt16; enabled: BOOLEAN): OSErr;
  1423. {  Disclosure triangles }
  1424.  
  1425. FUNCTION SetDisclosureTriangleLastValue(tabControl: ControlHandle; value: SInt16): OSErr;
  1426. {  Trap-based routines }
  1427.  
  1428. FUNCTION SendControlMessage(theControl: ControlHandle; message: SInt16; param: SInt32): SInt32;
  1429.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1430.     INLINE $303C, $FFFE, $AA73;
  1431.     {$ENDC}
  1432. FUNCTION DumpControlHierarchy(window: WindowPtr; {CONST}VAR outFile: FSSpec): OSErr;
  1433.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1434.     INLINE $303C, $FFFF, $AA73;
  1435.     {$ENDC}
  1436. FUNCTION CreateRootControl(window: WindowPtr; VAR control: ControlHandle): OSErr;
  1437.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1438.     INLINE $303C, $0001, $AA73;
  1439.     {$ENDC}
  1440. FUNCTION GetRootControl(window: WindowPtr; VAR control: ControlHandle): OSErr;
  1441.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1442.     INLINE $303C, $0002, $AA73;
  1443.     {$ENDC}
  1444. FUNCTION EmbedControl(control: ControlHandle; container: ControlHandle): OSErr;
  1445.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1446.     INLINE $303C, $0003, $AA73;
  1447.     {$ENDC}
  1448. FUNCTION AutoEmbedControl(control: ControlHandle; window: WindowPtr): OSErr;
  1449.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1450.     INLINE $303C, $0004, $AA73;
  1451.     {$ENDC}
  1452. FUNCTION IsControlActive(control: ControlHandle): BOOLEAN;
  1453.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1454.     INLINE $303C, $0005, $AA73;
  1455.     {$ENDC}
  1456. FUNCTION IsControlVisible(control: ControlHandle): BOOLEAN;
  1457.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1458.     INLINE $303C, $0006, $AA73;
  1459.     {$ENDC}
  1460. FUNCTION ActivateControl(control: ControlHandle): OSErr;
  1461.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1462.     INLINE $303C, $0007, $AA73;
  1463.     {$ENDC}
  1464. FUNCTION DeactivateControl(control: ControlHandle): OSErr;
  1465.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1466.     INLINE $303C, $0008, $AA73;
  1467.     {$ENDC}
  1468. FUNCTION FindControlUnderMouse(where: Point; window: WindowPtr; VAR part: SInt16): ControlHandle;
  1469.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1470.     INLINE $303C, $0009, $AA73;
  1471.     {$ENDC}
  1472. FUNCTION HandleControlClick(control: ControlHandle; where: Point; modifiers: SInt16; action: ControlActionUPP): SInt16;
  1473.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1474.     INLINE $303C, $000A, $AA73;
  1475.     {$ENDC}
  1476. FUNCTION HandleControlKey(control: ControlHandle; keyCode: SInt16; charCode: SInt16; modifiers: SInt16): SInt16;
  1477.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1478.     INLINE $303C, $000B, $AA73;
  1479.     {$ENDC}
  1480. PROCEDURE IdleControls(window: WindowPtr);
  1481.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1482.     INLINE $303C, $000C, $AA73;
  1483.     {$ENDC}
  1484. FUNCTION GetKeyboardFocus(window: WindowPtr; VAR control: ControlHandle): OSErr;
  1485.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1486.     INLINE $303C, $000D, $AA73;
  1487.     {$ENDC}
  1488. FUNCTION SetKeyboardFocus(window: WindowPtr; control: ControlHandle; part: ControlFocusPart): OSErr;
  1489.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1490.     INLINE $303C, $000E, $AA73;
  1491.     {$ENDC}
  1492. FUNCTION AdvanceKeyboardFocus(window: WindowPtr): OSErr;
  1493.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1494.     INLINE $303C, $000F, $AA73;
  1495.     {$ENDC}
  1496. FUNCTION ReverseKeyboardFocus(window: WindowPtr): OSErr;
  1497.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1498.     INLINE $303C, $0010, $AA73;
  1499.     {$ENDC}
  1500. FUNCTION GetControlFeatures(control: ControlHandle; VAR features: UInt32): OSErr;
  1501.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1502.     INLINE $303C, $0011, $AA73;
  1503.     {$ENDC}
  1504. FUNCTION SetControlData(control: ControlHandle; part: ControlPartCode; tagName: ResType; size: Size; data: Ptr): OSErr;
  1505.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1506.     INLINE $303C, $0012, $AA73;
  1507.     {$ENDC}
  1508. FUNCTION GetControlData(control: ControlHandle; part: ControlPartCode; tagName: ResType; bufferSize: Size; buffer: Ptr; VAR actualSize: Size): OSErr;
  1509.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1510.     INLINE $303C, $0013, $AA73;
  1511.     {$ENDC}
  1512. FUNCTION GetControlDataSize(control: ControlHandle; part: ControlPartCode; tagName: ResType; VAR maxSize: Size): OSErr;
  1513.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1514.     INLINE $303C, $0014, $AA73;
  1515.     {$ENDC}
  1516. FUNCTION GetSuperControl(control: ControlHandle; VAR parent: ControlHandle): OSErr;
  1517.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1518.     INLINE $303C, $0015, $AA73;
  1519.     {$ENDC}
  1520. FUNCTION CountSubControls(control: ControlHandle; VAR numChildren: SInt16): OSErr;
  1521.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1522.     INLINE $303C, $0016, $AA73;
  1523.     {$ENDC}
  1524. FUNCTION GetIndexedSubControl(control: ControlHandle; index: SInt16; VAR subControl: ControlHandle): OSErr;
  1525.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1526.     INLINE $303C, $0017, $AA73;
  1527.     {$ENDC}
  1528. PROCEDURE DrawControlInCurrentPort(theControl: ControlHandle);
  1529.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1530.     INLINE $303C, $0018, $AA73;
  1531.     {$ENDC}
  1532. FUNCTION ClearKeyboardFocus(window: WindowPtr): OSErr;
  1533.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1534.     INLINE $303C, $0019, $AA73;
  1535.     {$ENDC}
  1536. FUNCTION SetControlSupervisor(control: ControlHandle; boss: ControlHandle): OSErr;
  1537.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1538.     INLINE $303C, $001A, $AA73;
  1539.     {$ENDC}
  1540. FUNCTION GetBestControlRect(control: ControlHandle; VAR rect: Rect; VAR baseLineOffset: SInt16): OSErr;
  1541.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1542.     INLINE $303C, $001B, $AA73;
  1543.     {$ENDC}
  1544. FUNCTION SetControlFontStyle(control: ControlHandle; VAR style: ControlFontStyleRec): OSErr;
  1545.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1546.     INLINE $303C, $001C, $AA73;
  1547.     {$ENDC}
  1548. FUNCTION SetUpControlBackground(control: ControlHandle; depth: SInt16; colorDevice: BOOLEAN): OSErr;
  1549.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1550.     INLINE $303C, $001D, $AA73;
  1551.     {$ENDC}
  1552. FUNCTION SetControlVisibility(control: ControlHandle; isVisible: BOOLEAN; draw: BOOLEAN): OSErr;
  1553.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1554.     INLINE $303C, $001E, $AA73;
  1555.     {$ENDC}
  1556. {——————————————————————————————————————————————————————————————————————————————————}
  1557. {    Menu Manager APIs                                                                }
  1558. {——————————————————————————————————————————————————————————————————————————————————}
  1559. FUNCTION MenuEvent({CONST}VAR event: EventRecord): UInt32;
  1560.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1561.     INLINE $303C, $020C, $A825;
  1562.     {$ENDC}
  1563. FUNCTION SetMenuItemCommandID(menu: MenuHandle; item: SInt16; commandID: UInt32): OSErr;
  1564.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1565.     INLINE $303C, $0502, $A825;
  1566.     {$ENDC}
  1567. FUNCTION GetMenuItemCommandID(menu: MenuHandle; item: SInt16; VAR commandID: UInt32): OSErr;
  1568.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1569.     INLINE $303C, $0503, $A825;
  1570.     {$ENDC}
  1571. FUNCTION SetMenuItemModifiers(menu: MenuHandle; item: SInt16; modifiers: ByteParameter): OSErr;
  1572.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1573.     INLINE $303C, $0404, $A825;
  1574.     {$ENDC}
  1575. FUNCTION GetMenuItemModifiers(menu: MenuHandle; item: SInt16; VAR modifiers: UInt8): OSErr;
  1576.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1577.     INLINE $303C, $0505, $A825;
  1578.     {$ENDC}
  1579. FUNCTION SetMenuItemIconHandle(menu: MenuHandle; item: SInt16; iconType: ByteParameter; icon: Handle): OSErr;
  1580.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1581.     INLINE $303C, $0606, $A825;
  1582.     {$ENDC}
  1583. FUNCTION GetMenuItemIconHandle(menu: MenuHandle; item: SInt16; VAR iconType: UInt8; VAR icon: Handle): OSErr;
  1584.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1585.     INLINE $303C, $0707, $A825;
  1586.     {$ENDC}
  1587. FUNCTION SetMenuItemTextEncoding(menu: MenuHandle; item: SInt16; scriptID: TextEncoding): OSErr;
  1588.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1589.     INLINE $303C, $0408, $A825;
  1590.     {$ENDC}
  1591. FUNCTION GetMenuItemTextEncoding(menu: MenuHandle; item: SInt16; VAR scriptID: TextEncoding): OSErr;
  1592.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1593.     INLINE $303C, $0509, $A825;
  1594.     {$ENDC}
  1595. FUNCTION SetMenuItemHierarchicalID(menu: MenuHandle; item: SInt16; hierID: SInt16): OSErr;
  1596.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1597.     INLINE $303C, $040D, $A825;
  1598.     {$ENDC}
  1599. FUNCTION GetMenuItemHierarchicalID(menu: MenuHandle; item: SInt16; VAR hierID: SInt16): OSErr;
  1600.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1601.     INLINE $303C, $050E, $A825;
  1602.     {$ENDC}
  1603. FUNCTION SetMenuItemFontID(menu: MenuHandle; item: SInt16; fontID: SInt16): OSErr;
  1604.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1605.     INLINE $303C, $040F, $A825;
  1606.     {$ENDC}
  1607. FUNCTION GetMenuItemFontID(menu: MenuHandle; item: SInt16; VAR fontID: SInt16): OSErr;
  1608.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1609.     INLINE $303C, $0510, $A825;
  1610.     {$ENDC}
  1611. FUNCTION SetMenuItemRefCon(menu: MenuHandle; item: SInt16; refCon: UInt32): OSErr;
  1612.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1613.     INLINE $303C, $050A, $A825;
  1614.     {$ENDC}
  1615. FUNCTION GetMenuItemRefCon(menu: MenuHandle; item: SInt16; VAR refCon: UInt32): OSErr;
  1616.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1617.     INLINE $303C, $050B, $A825;
  1618.     {$ENDC}
  1619. FUNCTION SetMenuItemRefCon2(menu: MenuHandle; item: SInt16; refCon2: UInt32): OSErr;
  1620.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1621.     INLINE $303C, $0511, $A825;
  1622.     {$ENDC}
  1623. FUNCTION GetMenuItemRefCon2(menu: MenuHandle; item: SInt16; VAR refCon2: UInt32): OSErr;
  1624.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1625.     INLINE $303C, $0512, $A825;
  1626.     {$ENDC}
  1627. FUNCTION SetMenuItemKeyGlyph(menu: MenuHandle; item: SInt16; glyph: SInt16): OSErr;
  1628.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1629.     INLINE $303C, $0513, $A825;
  1630.     {$ENDC}
  1631. FUNCTION GetMenuItemKeyGlyph(menu: MenuHandle; item: SInt16; VAR glyph: SInt16): OSErr;
  1632.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1633.     INLINE $303C, $0514, $A825;
  1634.     {$ENDC}
  1635. {$ALIGN RESET}
  1636. {$POP}
  1637.  
  1638. {$SETC UsingIncludes := AppearanceIncludes}
  1639.  
  1640. {$ENDC} {__APPEARANCE__}
  1641.  
  1642. {$IFC NOT UsingIncludes}
  1643.  END.
  1644. {$ENDC}
  1645.